package service;

import dao.LoginOrRegisterDAOImpl;
import domain.Admin;
import domain.Student;

public class LoginOrRegisterServiceImpl {
    //创建DAO数据访问层对象
    LoginOrRegisterDAOImpl adminDAO = new LoginOrRegisterDAOImpl();
    //list Courses
    public Admin getUserInfo(String username){
//调用数据访问层对象的方法
        return adminDAO.getUserInfo(username);
    }

    public void register(String username, String password) {
        adminDAO.register(username, password);
    }

    public Student getStuInfo(String username) {
        return adminDAO.getStuInfo(username);
    }
}
